#include "staffclient.h"
int main()
{
  int sockfd;
  struct sockaddr_in serveraddr;

  socklen_t addrlen = sizeof(serveraddr);

  //创建套接字
  if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
  {
    ERRLOG("socket error");
  }

  //填充服务器网络信息结构体
  serveraddr.sin_family = AF_INET;
  serveraddr.sin_addr.s_addr = inet_addr("192.168.31.69");
  serveraddr.sin_port = htons(atoi("6666"));

  //给服务器发送连接请求
  if (connect(sockfd, (struct sockaddr *)&serveraddr, addrlen) == -1)
  {
    ERRLOG("connect error");
  }
  MSG msg;
  msg.acceptfd = sockfd;
  msg.clientaddr = serveraddr;
  do_Main_meun(msg);
  return 0;
}
